package mj

import "go.uber.org/fx"

// RegisterMJServiceObj 注册 MJ Service and client
func RegisterMJServiceObj() fx.Option {
	return fx.Module("mj_service",
		fx.Provide(NewClient),
		fx.Provide(NewService),
		// 启动 MJ 处理任务队列
		fx.Invoke(func(s *Service) {
			s.Run()
			s.SyncTaskProgress()
			s.CheckTaskNotify()
			s.DownloadImages()
		}),
	)
}
